Skip to main content

Update Order Info

Path

  • URL: /cb-core/api/v1/payment/update-info
  • Method: POST
  • Description: This API allows to update payment info of an order after the payment has been created and the payment has been completed

Request

Request Table

ParamsData Type + LengthRequiredDescription
request_idstring(50)YesUnique request ID, suggested format: MerchantCode+YYYYMMDDHHMMSS+UniqueId
request_timestring(19)YesRequest time in format: YYYY-MM-DD HH:MM:SS
merchant_codestring(20)YesMerchant code provided by Baokim before integration
sub_merchant_codestring(50)YesSub merchant code provided by Baokim before integration
merchant_payment_idstring(50)YesMerchant payment's ID
seller_idstring(50)YesSeller ID matching the Onboarding Sellers API
articlearrayYesList of articles
article.idstring(20)YesArticle ID
article.namestring(255)YesName of product/service
article.quantityint(3)YesArticle quantity
article.pricedoubleYesArticle price
customerobjectYesCustomer information
customer.first_namestring(100)YesCustomer first name
customer.last_namestring(100)YesCustomer last name
customer.emailstring(255)YesCustomer email
customer.phonestring(255)YesCustomer phone
customer.addressstring(255)YesCustomer address
customer.date_of_birthdatetimeYesCustomer date of birth formt YYYY-MM-DD
customer.gendertinyintYesCustomer gender 1. Male 2. Female, 3. Other
customer.social_idstring(20)YesCustomer social id
billingsobjectYesBilling information
billings.first_namestring(50)YesFirst name
billings.last_namestring(50)YesLast name
billings.addressstring(255)YesBilling address
billings.citystring(255)YesCity of billing address
billings.statestring(255)YesState of billing address
billings.zip_codestring(255)YesZip code of billing address
billings.streetstring(255)YesStreet name of the billing address
billings.street_numberstring(255)YesStreet number of the billing address
billings.house_numberstring(255)YesHouse number of the billing address
billings.house_extensionstring(255)YesHouse extension of the billing address
shippingsobjectYesShipping information
shippings.first_namestring(50)YesFirst name
shippings.last_namestring(50)YesLast name
shippings.addressstring(255)YesShipping address
shippings.citystring(255)YesCity of shipping address
shippings.statestring(255)YesState of shipping address
shippings.zip_codestring(255)YesZip code of shipping address
shippings.streetstring(255)YesStreet name of the shipping address
shippings.street_numberstring(255)YesStreet number of the shipping address
shippings.house_numberstring(255)YesHouse number of the shipping address
shippings.house_extensionstring(255)NoHouse extension of the shipping address

Request Example

{
"request_id": "MerchantCode+YYYYMMDDHHMMSS+UniqueId",
"request_time": "YYYY-MM-DD HH:MM:SS",
"merchant_code": "MerchantCode",
"sub_merchant_code": "SubMerchantCode",
"seller_id": "SELLER12345678901234510281",
"merchant_payment_id": "MerchantOrderID",
"article":
[
{
"id": 1,
"name": "Product name",
"price": 300000,
"quantity": 1
}
],
"customer": {
"first_name": "John",
"last_name": "Doe",
"email": "[email protected]",
"phone": "1234567890",
"address": "123 Main St",
"date_of_birth": "1990-01-01",
"gender": 1,
"social_id": "1234567890"
},
"billings": {
"first_name": "John",
"last_name": "Doe",
"address": "123 Main St",
"city": "New York",
"state": "NY",
"zip_code": "10001",
"street": "Main St",
"street_number": "123",
"house_number": "456",
"house_extension": "A"
},
"shippings": {
"first_name": "Jane",
"last_name": "Doe",
"address": "456 Main St",
"city": "New York",
"state": "NY",
"zip_code": "10001",
"street": "Main St",
"street_number": "123",
"house_number": "456",
"house_extension": "A"
}
}

Response

Response Table

ParamsData Type + LengthRequiredDescription
response_codeint(4)YesError code from Baokim as per Error Codes Table
response_messagestring(100)YesDescription of the error code from Baokim as per Error Codes Table
dataobjectYesData of the response
data.merchant_codestring(20)YesMerchant code provided by Baokim before integration
data.sub_merchant_codestring(20)YesSub merchant code provided by Baokim before integration
data.seller_idstring(20)YesSeller ID provided by Baokim before integration
data.merchant_payment_idstring(100)YesThe reference code of order managed in your system. This code is unique
articlearrayYesList of articles
article.idstring(20)YesArticle ID
article.namestring(255)YesName of product/service
article.quantityint(3)YesArticle quantity
article.pricedoubleYesArticle price
customerobjectYesCustomer information
customer.first_namestring(100)YesCustomer first name
customer.last_namestring(100)YesCustomer last name
customer.emailstring(255)YesCustomer email
customer.phonestring(255)YesCustomer phone
customer.addressstring(255)YesCustomer address
customer.date_of_birthdatetimeYesCustomer date of birth formt YYYY-MM-DD
customer.gendertinyintYesCustomer gender 1. Male 2. Female, 3. Other
customer.social_idstring(20)YesCustomer social id
billingsobjectYesBilling information
billings.first_namestring(50)YesFirst name
billings.last_namestring(50)YesLast name
billings.addressstring(255)YesBilling address
billings.citystring(255)YesCity of billing address
billings.statestring(255)YesState of billing address
billings.zip_codestring(255)YesZip code of billing address
billings.streetstring(255)YesStreet name of the billing address
billings.street_numberstring(255)YesStreet number of the billing address
billings.house_numberstring(255)YesHouse number of the billing address
billings.house_extensionstring(255)YesHouse extension of the billing address
shippingsobjectYesShipping information
shippings.first_namestring(50)YesFirst name
shippings.last_namestring(50)YesLast name
shippings.addressstring(255)YesShipping address
shippings.citystring(255)YesCity of shipping address
shippings.statestring(255)YesState of shipping address
shippings.zip_codestring(255)YesZip code of shipping address
shippings.streetstring(255)YesStreet name of the shipping address
shippings.street_numberstring(255)YesStreet number of the shipping address
shippings.house_numberstring(255)YesHouse number of the shipping address
shippings.house_extensionstring(255)NoHouse extension of the shipping address

Response Example

{
"response_code": 200,
"response_message": "Success",
"data": {
"merchant_code": "PHUONGTT",
"sub_merchant_code": "SUBPHUONGTT",
"seller_id": "SELLER12345678901234510281",
"order_id": "BK1234567890",
"merchant_payment_id": "1234567890",
"article": [
{
"id": 1,
"name": "Product name",
"price": 300000,
"quantity": 1
}
],
"customer": {
"first_name": "John",
"last_name": "Doe",
"email": "[email protected]",
"phone": "1234567890",
"address": "123 Main St",
"date_of_birth": "1990-01-01",
"gender": 1,
"social_id": "1234567890"
},
"billings": {
"first_name": "John",
"last_name": "Doe",
"address": "123 Main St",
"city": "New York",
"state": "NY",
"zip_code": "10001",
"street": "Main St",
"street_number": "123",
"house_number": "456",
"house_extension": "A"
},
"shippings": {
"first_name": "Jane",
"last_name": "Doe",
"address": "456 Main St",
"city": "New York",
"state": "NY",
"zip_code": "10001",
"street": "Main St",
"street_number": "123",
"house_number": "456",
"house_extension": "A"
}
}
}

Error Code

Response CodeResponse Message
200Success
99Pending
11Failed
101System Error
110Merchant Code Invalid
120Invalid Signature
422Validation Error